색인 기 C\#색인 기 분석(Indexer) 색인 기(Indexer)는 한 대상 이 배열 처럼 색인 되 는 것 을 허용 합 니 다.클래스 에 색인 기 를 정의 할 때 이러한 행 위 는 가상 배열(virtual array)과 같 습 니 다.이러한 인 스 턴 스 에 접근 하기 위해 서 는 배열 접근 연산 자([])를 사용 할 수 있 습 니 다. 색인 기의 행동 에 대한 설명 은 어느 정도 속성(property)과 유사 합 니 다.속성(pr... c#색인 기Indexer C\#색인 기 간단 한 인 스 턴 스 코드 public class Fruit string peach = "a round juicy fruit that has a soft yellow or red skin and a large hard seed in the center, or the tree that this fruit grows on"; string orange = "a round fruit that has a thick orange... C#색인 기실례
C\#색인 기 분석(Indexer) 색인 기(Indexer)는 한 대상 이 배열 처럼 색인 되 는 것 을 허용 합 니 다.클래스 에 색인 기 를 정의 할 때 이러한 행 위 는 가상 배열(virtual array)과 같 습 니 다.이러한 인 스 턴 스 에 접근 하기 위해 서 는 배열 접근 연산 자([])를 사용 할 수 있 습 니 다. 색인 기의 행동 에 대한 설명 은 어느 정도 속성(property)과 유사 합 니 다.속성(pr... c#색인 기Indexer C\#색인 기 간단 한 인 스 턴 스 코드 public class Fruit string peach = "a round juicy fruit that has a soft yellow or red skin and a large hard seed in the center, or the tree that this fruit grows on"; string orange = "a round fruit that has a thick orange... C#색인 기실례